FROM  openjdk:21

MAINTAINER kxw

ENV TZ=Asia/Shanghai
ENV JAVA_OPTS="-Xms512m -Xmx2048m --enable-preview"

RUN ln -sf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

#容器中工作目录
WORKDIR /docker-work
#将本地jar包copy到容器根目录下
ADD  /target/wind-manager-system-1.0-SNAPSHOT.jar .

EXPOSE 52001

#CMD java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar manager.jar --spring.profiles.active=prod
CMD java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar wind-manager-system-1.0-SNAPSHOT.jar